using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace WebDauGia.Domain.Models.Mapping
{
    public class PhuongThucThanhToanMap : EntityTypeConfiguration<PhuongThucThanhToan>
    {
        public PhuongThucThanhToanMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.ten)
                .IsRequired()
                .HasMaxLength(100);

            this.Property(t => t.code)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("PhuongThucThanhToan");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.ten).HasColumnName("ten");
            this.Property(t => t.ghichu).HasColumnName("ghichu");
            this.Property(t => t.code).HasColumnName("code");
        }
    }
}
